<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/26/026
 * Time: 0:33
 */

namespace app\admin\controller;


use think\Db;

class AdminOrder extends Base
{
    public function index ()
    {
//        dump(input('get.')); die;
        if ( empty(input('post.id')) ) {
            $where = "";

        } else {
            $id = input('post.id');
            $where['id'] = array('=', $id);

        }

        $data = Db::name('myclass')
            ->field('id, uid, cid, cname, createtime, price')
            ->where($where)
            ->paginate(5, false, ['query'=>request()->param()]);

        $this->assign('data', $data);

        return $this->fetch('order/index');
    }
}